<!--
 * @Author: HeAo
 * @Date: 2021-12-29 21:52:08
 * @LastEditTime: 2022-01-05 14:49:17
 * @LastEditors: HeAo
 * @Description: 
 * @FilePath: \am-ui\src\pages\am\monitor\History.vue
 * 别乱动！
-->
<template>
  <div class="history">
    <el-date-picker
      v-model="dataTime"
      type="datetimerange"
      range-separator="至"
      start-placeholder="开始日期"
      end-placeholder="结束日期"
      value-format="timestamp"
    >
    </el-date-picker>
    <el-button type="primary" icon="el-icon-search" @click="toSearchHandler"
      >搜索</el-button
    >
    {{ dataTime }}
  </div>
</template>
<script>
export default {
  data() {
    return {
      dataTime: [],
      params: {
        page: 1,
        pageSize: 10,
      },
    };
  },
  methods: {
    toSearchHandler() {
      this.params = {
        ...this.params,
        begin_time: this.dataTime[0],
        end_time: this.dataTime[1],
      };
      console.log(this.params);
    },
  },
};
</script>